#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<stack>
using namespace std;
stack<int> s;

int main() {
	int n; cin >> n;
	for (int i = 1; i <= n; i++) {
		int x; cin >> x;
		s.push(x);
	}
	
	while (s.size()) {
		cout << s.top() << endl;
		s.pop();
	}
	return 0;
}